
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>ES8 (ES2017) · React 基础学习资料</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="小翼">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="04.html" />
    
    
    <link rel="prev" href="02.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    React 手稿
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../chapter01/00.html">
            
                <a href="../chapter01/00.html">
            
                    
                    基础知识
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../chapter01/01.html">
            
                <a href="../chapter01/01.html">
            
                    
                    初识React
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../chapter01/02.html">
            
                <a href="../chapter01/02.html">
            
                    
                    React 特性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../chapter01/03.html">
            
                <a href="../chapter01/03.html">
            
                    
                    React Initial Project
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../chapter01/04.html">
            
                <a href="../chapter01/04.html">
            
                    
                    Component和Dom
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../chapter01/05.html">
            
                <a href="../chapter01/05.html">
            
                    
                    生态组件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../chapter02/00.html">
            
                <a href="../chapter02/00.html">
            
                    
                    组件生命周期
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../chapter02/01.html">
            
                <a href="../chapter02/01.html">
            
                    
                    装载
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../chapter02/02.html">
            
                <a href="../chapter02/02.html">
            
                    
                    更新
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../chapter02/03.html">
            
                <a href="../chapter02/03.html">
            
                    
                    卸载
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../chapter02/04.html">
            
                <a href="../chapter02/04.html">
            
                    
                    异常处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../chapter02/05.html">
            
                <a href="../chapter02/05.html">
            
                    
                    React.Component
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../chapter03/00.html">
            
                <a href="../chapter03/00.html">
            
                    
                    state
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../chapter03/01.html">
            
                <a href="../chapter03/01.html">
            
                    
                    Component state
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../chapter03/02.html">
            
                <a href="../chapter03/02.html">
            
                    
                    React-Redux
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../chapter03/03.html">
            
                <a href="../chapter03/03.html">
            
                    
                    React-Router
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../chapter03/04.html">
            
                <a href="../chapter03/04.html">
            
                    
                    redux-saga
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../chapter04/00.html">
            
                <a href="../chapter04/00.html">
            
                    
                    组件其他方法
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../chapter04/01.html">
            
                <a href="../chapter04/01.html">
            
                    
                    其他API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../chapter04/02.html">
            
                <a href="../chapter04/02.html">
            
                    
                    类属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../chapter04/03.html">
            
                <a href="../chapter04/03.html">
            
                    
                    实例属性
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../chapter05/00.html">
            
                <a href="../chapter05/00.html">
            
                    
                    React 高级用法
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../chapter05/01.html">
            
                <a href="../chapter05/01.html">
            
                    
                    keys
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../chapter05/02.html">
            
                <a href="../chapter05/02.html">
            
                    
                    事件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../chapter05/03.html">
            
                <a href="../chapter05/03.html">
            
                    
                    Refs
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../chapter05/04.html">
            
                <a href="../chapter05/04.html">
            
                    
                    Fragment
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../chapter05/05.html">
            
                <a href="../chapter05/05.html">
            
                    
                    Context
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="../chapter05/06.html">
            
                <a href="../chapter05/06.html">
            
                    
                    高阶组件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="../chapter05/07.html">
            
                <a href="../chapter05/07.html">
            
                    
                    类型查检
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8" data-path="../chapter05/08.html">
            
                <a href="../chapter05/08.html">
            
                    
                    代码分隔
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../chapter06/00.html">
            
                <a href="../chapter06/00.html">
            
                    
                    React 实例
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../chapter06/01.html">
            
                <a href="../chapter06/01.html">
            
                    
                    List
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../chapter06/02.html">
            
                <a href="../chapter06/02.html">
            
                    
                    Form
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../chapter06/03.html">
            
                <a href="../chapter06/03.html">
            
                    
                    Form高级
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../chapter06/04.html">
            
                <a href="../chapter06/04.html">
            
                    
                    Tooltip
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../chapter07/00.html">
            
                <a href="../chapter07/00.html">
            
                    
                    React项目打包部署
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../chapter07/01.html">
            
                <a href="../chapter07/01.html">
            
                    
                    与服务端交互
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../chapter07/02.html">
            
                <a href="../chapter07/02.html">
            
                    
                    打包
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../chapter07/03.html">
            
                <a href="../chapter07/03.html">
            
                    
                    部署
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="00.html">
            
                <a href="00.html">
            
                    
                    浅谈ES
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="01.html">
            
                <a href="01.html">
            
                    
                    ES6 (ES2015)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="02.html">
            
                <a href="02.html">
            
                    
                    ES7 (ES2016)
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.9.3" data-path="03.html">
            
                <a href="03.html">
            
                    
                    ES8 (ES2017)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.4" data-path="04.html">
            
                <a href="04.html">
            
                    
                    ES9 (ES2018)
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../chapter09/00.html">
            
                <a href="../chapter09/00.html">
            
                    
                    React Hooks
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" data-path="../chapter09/01.html">
            
                <a href="../chapter09/01.html">
            
                    
                    State Hooks useState
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" data-path="../chapter09/02.html">
            
                <a href="../chapter09/02.html">
            
                    
                    State Hooks useReducer
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >ES8 (ES2017)</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="es8-es2017">ES8 (ES2017)</h1>
<h2 id="&#x5B57;&#x7B26;&#x4E32;&#x586B;&#x5145;">&#x5B57;&#x7B26;&#x4E32;&#x586B;&#x5145;</h2>
<ul>
<li><p>padStart</p>
<p>&#x7528;&#x53E6;&#x4E00;&#x4E2A;&#x5B57;&#x7B26;&#x4E32;&#x4ECE;&#x5934;&#x5F00;&#x59CB;&#x586B;&#x5145;&#x5F53;&#x524D;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#x3002;</p>
<p>&#x8BED;&#x6CD5;&#xFF1A;<code>str.padStart(targetLength [, padString])</code></p>
<ul>
<li><p><code>targetLength</code>: &#x5F53;&#x524D;&#x5B57;&#x7B26;&#x4E32;&#x9700;&#x8981;&#x586B;&#x5145;&#x5230;&#x7684;&#x76EE;&#x6807;&#x957F;&#x5EA6;&#x3002;&#x5982;&#x679C;&#x8FD9;&#x4E2A;&#x6570;&#x503C;&#x5C0F;&#x4E8E;&#x5F53;&#x524D;&#x5B57;&#x7B26;&#x4E32;&#x7684;&#x957F;&#x5EA6;&#xFF0C;&#x5219;&#x8FD4;&#x56DE;&#x5F53;&#x524D;&#x5B57;&#x7B26;&#x4E32;&#x672C;&#x8EAB;&#x3002;</p>
</li>
<li><p><code>padString</code>: &#x53EF;&#x9009;&#x3002;&#x586B;&#x5145;&#x5B57;&#x7B26;&#x4E32;&#x3002;&#x5982;&#x679C;&#x5B57;&#x7B26;&#x4E32;&#x592A;&#x957F;&#xFF0C;&#x4F7F;&#x586B;&#x5145;&#x540E;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#x957F;&#x5EA6;&#x8D85;&#x8FC7;&#x4E86;&#x76EE;&#x6807;&#x957F;&#x5EA6;&#xFF0C;&#x5219;&#x53EA;&#x4FDD;&#x7559;&#x6700;&#x5DE6;&#x4FA7;&#x7684;&#x90E8;&#x5206;&#xFF0C;&#x5176;&#x4ED6;&#x90E8;&#x5206;&#x4F1A;&#x88AB;&#x622A;&#x65AD;&#x3002;&#x9ED8;&#x8BA4;&#x4E3A;&#xFF1A; <code>&apos;&apos;</code>;</p>
</li>
</ul>
<p>&#x793A;&#x4F8B;&#xFF1A;</p>
<pre><code class="lang-js"><span class="hljs-string">&apos;abc&apos;</span>.padStart(<span class="hljs-number">10</span>);         <span class="hljs-comment">// &quot;       abc&quot;</span>
<span class="hljs-string">&apos;abc&apos;</span>.padStart(<span class="hljs-number">10</span>, <span class="hljs-string">&quot;foo&quot;</span>);  <span class="hljs-comment">// &quot;foofoofabc&quot;</span>
<span class="hljs-string">&apos;abc&apos;</span>.padStart(<span class="hljs-number">6</span>,<span class="hljs-string">&quot;123465&quot;</span>); <span class="hljs-comment">// &quot;123abc&quot;</span>
<span class="hljs-string">&apos;abc&apos;</span>.padStart(<span class="hljs-number">8</span>, <span class="hljs-string">&quot;0&quot;</span>);     <span class="hljs-comment">// &quot;00000abc&quot;</span>
<span class="hljs-string">&apos;abc&apos;</span>.padStart(<span class="hljs-number">1</span>);          <span class="hljs-comment">// &quot;abc&quot;</span>
</code></pre>
</li>
<li><p>padEnd</p>
<p>&#x7528;&#x53E6;&#x4E00;&#x4E2A;&#x5B57;&#x7B26;&#x4E32;&#x4ECE;&#x672B;&#x5C3E;&#x5F00;&#x59CB;&#x586B;&#x5145;&#x5F53;&#x524D;&#x5B57;&#x7B26;&#x4E32;&#x3002;&#x4E0E;<code>padStart</code>&#x76F8;&#x53CD;&#x3002;</p>
<p>&#x8BED;&#x6CD5;&#xFF1A; <code>str.padEnd(targetLength [, padString])</code></p>
<ul>
<li><p><code>targetLength</code>: &#x5F53;&#x524D;&#x5B57;&#x7B26;&#x4E32;&#x9700;&#x8981;&#x586B;&#x5145;&#x5230;&#x7684;&#x76EE;&#x6807;&#x957F;&#x5EA6;&#x3002;&#x5982;&#x679C;&#x8FD9;&#x4E2A;&#x6570;&#x503C;&#x5C0F;&#x4E8E;&#x5F53;&#x524D;&#x5B57;&#x7B26;&#x4E32;&#x7684;&#x957F;&#x5EA6;&#xFF0C;&#x5219;&#x8FD4;&#x56DE;&#x5F53;&#x524D;&#x5B57;&#x7B26;&#x4E32;&#x672C;&#x8EAB;&#x3002;</p>
</li>
<li><p><code>padString</code>: &#x53EF;&#x9009;&#x3002;&#x586B;&#x5145;&#x5B57;&#x7B26;&#x4E32;&#x3002;&#x5982;&#x679C;&#x5B57;&#x7B26;&#x4E32;&#x592A;&#x957F;&#xFF0C;&#x4F7F;&#x586B;&#x5145;&#x540E;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#x957F;&#x5EA6;&#x8D85;&#x8FC7;&#x4E86;&#x76EE;&#x6807;&#x957F;&#x5EA6;&#xFF0C;&#x5219;&#x53EA;&#x4FDD;&#x7559;&#x6700;&#x5DE6;&#x4FA7;&#x7684;&#x90E8;&#x5206;&#xFF0C;&#x5176;&#x4ED6;&#x90E8;&#x5206;&#x4F1A;&#x88AB;&#x622A;&#x65AD;&#x3002;&#x9ED8;&#x8BA4;&#x4E3A;&#xFF1A; <code>&apos;&apos;</code>;</p>
</li>
</ul>
<p>&#x793A;&#x4F8B;&#xFF1A;</p>
<pre><code class="lang-js"><span class="hljs-string">&apos;abc&apos;</span>.padEnd(<span class="hljs-number">10</span>);          <span class="hljs-comment">// &quot;abc       &quot;</span>
<span class="hljs-string">&apos;abc&apos;</span>.padEnd(<span class="hljs-number">10</span>, <span class="hljs-string">&quot;foo&quot;</span>);   <span class="hljs-comment">// &quot;abcfoofoof&quot;</span>
<span class="hljs-string">&apos;abc&apos;</span>.padEnd(<span class="hljs-number">6</span>, <span class="hljs-string">&quot;123456&quot;</span>); <span class="hljs-comment">// &quot;abc123&quot;</span>
<span class="hljs-string">&apos;abc&apos;</span>.padEnd(<span class="hljs-number">1</span>);           <span class="hljs-comment">// &quot;abc&quot;</span>
</code></pre>
</li>
</ul>
<h2 id="objectvalues">Object.values</h2>
<p>  <code>Object.values()</code>&#x8FD4;&#x56DE;&#x4E00;&#x4E2A;&#x5BF9;&#x8C61;&#x6240;&#x4EE5;&#x7684;&#x503C;&#x7684;&#x6570;&#x7EC4;&#x3002;</p>
<p>  &#x793A;&#x4F8B;&#xFF1A;</p>
<pre><code class="lang-js">  <span class="hljs-keyword">const</span> obj = { foo: <span class="hljs-string">&apos;bar&apos;</span>, baz: <span class="hljs-number">100</span> };
  <span class="hljs-built_in">console</span>.log(<span class="hljs-built_in">Object</span>.values(obj)); <span class="hljs-comment">// [&apos;bar&apos;, 100]</span>
</code></pre>
<h2 id="objectentries">Object.entries</h2>
<p>  <code>Object.entries()</code>&#x8FD4;&#x56DE;&#x4E00;&#x4E2A;&#x6570;&#x7EC4;&#xFF0C;&#x5185;&#x5BB9;&#x4E3A;&#x7ED9;&#x5B9A;&#x5BF9;&#x8C61;&#x7684;&#x952E;&#x503C;&#x5BF9;&#x6570;&#x7EC4;&#x3002;</p>
<p>  &#x793A;&#x4F8B;&#xFF1A;</p>
<pre><code class="lang-js">  <span class="hljs-keyword">const</span> obj = { foo: <span class="hljs-string">&apos;bar&apos;</span>, baz: <span class="hljs-number">100</span> };
  <span class="hljs-built_in">console</span>.log(<span class="hljs-built_in">Object</span>.entries(obj)); <span class="hljs-comment">// [[&quot;foo&quot;, &quot;bar&quot;], [&quot;baz&quot;, 100]]</span>
</code></pre>
<h2 id="objectgetownpropertydescriptors">Object.getOwnPropertyDescriptors</h2>
<p>  <code>Object.getOwnPropertyDescriptors()</code> &#x65B9;&#x6CD5;&#x7528;&#x6765;&#x83B7;&#x53D6;&#x4E00;&#x4E2A;&#x5BF9;&#x8C61;&#x7684;&#x6240;&#x6709;&#x81EA;&#x8EAB;&#x5C5E;&#x6027;&#x7684;&#x63CF;&#x8FF0;&#x7B26;&#x3002;</p>
<p>  &#x793A;&#x4F8B;&#xFF1A;</p>
<pre><code class="lang-js">  <span class="hljs-built_in">Object</span>.getOwnPropertyDescriptors({foo: <span class="hljs-string">&apos;bar&apos;</span>, baz: <span class="hljs-number">100</span>})
</code></pre>
<p>  &#x7ED3;&#x679C;</p>
<pre><code class="lang-js">  {
    baz:{
    configurable: <span class="hljs-literal">true</span>
    enumerable: <span class="hljs-literal">true</span>
    value: <span class="hljs-number">100</span>
    writable: <span class="hljs-literal">true</span>
    }

  foo: {
    configurable: <span class="hljs-literal">true</span>
    enumerable: <span class="hljs-literal">true</span>
    value: <span class="hljs-string">&quot;bar&quot;</span>
    writable: <span class="hljs-literal">true</span>
    }
  }
</code></pre>
<h2 id="&#x5F02;&#x6B65;&#x51FD;&#x6570;async">&#x5F02;&#x6B65;&#x51FD;&#x6570;Async</h2>
<p>  <code>Async</code>&#x51FD;&#x6570;&#x53EF;&#x4EE5;&#x66FF;&#x4EE3;&#x4EE5;&#x524D;&#x7684;&#x51FD;&#x6570;&#x56DE;&#x8C03;&#x6216;&#x8005;ES6&#x4E2D;&#x7684;<code>Promise()</code>&#x6765;&#x5B9E;&#x73B0;&#x5F02;&#x6B65;&#x8C03;&#x7528;&#x3002;</p>
<p>  &#x793A;&#x4F8B;&#xFF1A;</p>
<pre><code class="lang-js">  <span class="hljs-keyword">async</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">doSomething</span>(<span class="hljs-params"></span>) </span>{
    <span class="hljs-keyword">const</span>
      response1 = <span class="hljs-keyword">await</span> doSomething1(),
      response2 = <span class="hljs-keyword">await</span> doSomething2(response1),
      response3 = <span class="hljs-keyword">await</span> doSomething3(response2);
  }
</code></pre>
<h2 id="&#x7ED3;&#x5C3E;&#x9017;&#x53F7;">&#x7ED3;&#x5C3E;&#x9017;&#x53F7;</h2>
<p>&#x4ECE;&#x8FD9;&#x4E2A;&#x7248;&#x672C;&#x5F00;&#x59CB;&#xFF0C;&#x53EF;&#x4EE5;&#x652F;&#x6301;&#x6570;&#x7EC4;&#x3001;&#x5BF9;&#x8C61;&#x3001;&#x53C2;&#x6570;&#x7B49;&#x6700;&#x540E;&#x4E00;&#x4E2A;&#x7ED3;&#x5C3E;&#x53EF;&#x4EE5;&#x52A0; <code>,</code>.&#x4F8B;&#x5982;&#xFF1A;</p>
<pre><code class="lang-js"><span class="hljs-keyword">const</span> a = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>,];

<span class="hljs-keyword">const</span> b = {
  a: <span class="hljs-number">1</span>,
  b: <span class="hljs-number">2</span>,
  c: <span class="hljs-number">3</span>,
};

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">c</span>(<span class="hljs-params">one,two,three,</span>) </span>{};
</code></pre>
<h2 id="sharearraybuffer&#x548C;atomics">ShareArrayBuffer&#x548C;Atomics</h2>
<p>  &#x7528;&#x4E8E;&#x4ECE;&#x5171;&#x4EAB;&#x5185;&#x5B58;&#x4F4D;&#x7F6E;&#x8BFB;&#x53D6;&#x548C;&#x5199;&#x5165;&#x3002;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="02.html" class="navigation navigation-prev " aria-label="Previous page: ES7 (ES2016)">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="04.html" class="navigation navigation-next " aria-label="Next page: ES9 (ES2018)">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"ES8 (ES2017)","level":"1.9.3","depth":2,"next":{"title":"ES9 (ES2018)","level":"1.9.4","depth":2,"path":"chapter08/04.md","ref":"./chapter08/04.md","articles":[]},"previous":{"title":"ES7 (ES2016)","level":"1.9.2","depth":2,"path":"chapter08/02.md","ref":"./chapter08/02.md","articles":[]},"dir":"ltr"},"config":{"plugins":[],"root":"./books","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"小翼","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"React 基础学习资料","language":"zh-hans","links":{"gitbook":false,"sharing":{"google":true,"facebook":true,"twitter":true}},"gitbook":"*"},"file":{"path":"chapter08/03.md","mtime":"2020-03-07T07:33:43.874Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-03-09T08:08:41.080Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

